#include <my_head.h>

int main(int argc, const char *argv[]){
    key_t my_key = 0;
    if(-1 == (my_key = ftok("/home/linux", 'A')))
        ERR_LOG("ftok error");
    printf("%d\n", my_key);
    printf("my_key = %#x\n", my_key);

    // 键值生成规则 ----了解即可
    struct stat x;
    if(-1 == stat("/home/linux", &x))
        ERR_LOG("stat error");
    printf("dev = %#lx\n", x.st_dev);
    printf("inode = %#lx\n", x.st_ino);
    printf("proj_id = %#x\n", 'A');

    return 0;
}